<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本方向</title>

    <style type="text/css">
        .container {
            display: flex;
            width: 80vw;
            height: 20vh;
            border: 1px solid blue;
            margin: 25px auto;
        }
        
        .item {
            width: 30%;
            height: 50%;
            text-align: center;
            font-size: 30px;
        }
        
        .item:nth-child(odd) {
            background: #6666fa;
        }
        
        .item:nth-child(even) {
            background: #fa6666;
        }
        
        .container1 {
            /* 文本方向 : left to right */
            direction: ltr;
        }
        
        .container2 {
            /* 文本方向 : right to left */
            direction: rtl;
        }
    </style>
</head>

<body>

    <div class="container container1">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        今天天气好晴朗，处处是情侣
    </div>

    <div class="container container2">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        今天天气好晴朗，处处是情侣
    </div>

    <hr>

    <div class="container container3" dir="ltr">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
    </div>

    <div class="container container3" dir="rtl">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
    </div>

</body>

</html>